# coding:utf-8
from pip._vendor.distlib.compat import raw_input

rows = int(raw_input("请输入边长:"))  # type: int
# 声明变量，i用于控制外层循环（图形行数），j用于控制空格的个数，k用于控制*的个数
i = j = k = 1  # type: int
print("等腰直角三角形")
for i in range(rows):
    for k in range(rows - i):
        print("*"),
        k += 1
    i += 1
    print("\n")

print("打印实心等边三角形")
for i in range(rows + 1):
    for j in range(rows - i):
        print(" "),
        j += 1
    for k in range(0, 2 * i - 1):
        # if k == 0 or k == 2 * i - 2 or i == rows:
        # if i == rows:
        # if k % 2 == 0:
        #     print("*"),
        # else:
        #     print(" "),
        # else:
        print("*"),
        # else:
        #     print(" "),
        k += 1
    print("\n")
    i += 1

print("打印菱形")
for i in range(rows):
    for j in range(rows - i):
        print(" "),
        j += 1
    for k in range(2 * i - 1):
        if k == 0 or k == 2 * i - 2:
            print("*"),
        else:
            print(" "),
        k += 1
    print("\n")
    i += 1
for i in range(rows):
    for j in range(i):
        print(" "),
        j += 1
    for k in range(2 * (rows - i) - 1):
        if k == 0 or k == 2 * (rows - i) - 2:
            print("*"),
        else:
            print(" "),
        k += 1
    print("\n")
    i += 1

print("打印实心正方形")
for i in range(rows):
    for k in range(rows):
        print(" * "),
        k += 1
    i += 1
    print("\n")
print("打印空心正方形")
for i in range(rows):
    for k in range(rows):
        if i != 0 and i != rows - 1:
            if k == 0 or k == rows - 1:
                print(" * "),
            else:
                print("   "),
        else:
            print(" * "),
        k += 1
    i += 1
    print("\n")
